import styles from "./index.module.less";
export default defineComponent({
  name: "TipsCard",
  props: {
    title: {
      type: String,
      required: false,
      default: "",
    },
    content: {
      type: String,
      required: false,
      default: "",
    },
  },
  setup(props: any, { attrs, emit, expose, slots }) {
    const { title, content } = props;
    const tmp_content = content?.value ?? content;
    return () => {
      return (
        <div class={[styles.tips_card, "mb16"]}>
          <div class={styles.icon}>
            {renderIcon("icon-jinggao-" + " " + styles["icon-jinggao-"])}
          </div>
          <div class={styles.txt}>
            <div class={styles.title}>{title?.value ?? title}</div>
            {isString(tmp_content) ? (
              <div class={[styles.content]}>{tmp_content}</div>
            ) : (
              tmp_content.map((text) => (
                <div class={[styles.content]}>{text}</div>
              ))
            )}
          </div>
        </div>
      );
    };
  },
});
